#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QPushButton>
#include <QInputDialog>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    QPushButton* btn = new QPushButton("输入对话框",this);
    QInputDialog* id = new QInputDialog(this);
    connect(btn,&QPushButton::clicked,[=]()
    {
        int i = id->getInt(this,"输入框","int型");
    });
}

MainWindow::~MainWindow()
{
    delete ui;
}

